package com.neuedu.service.impl;

import java.util.List;
import java.util.Map;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.neuedu.dao.FoodDao;
import com.neuedu.model.Food;
import com.neuedu.service.FoodService;

//配置一个spring的服务类，把业务实现类交给spring进行管理，把Spring完成依赖注入
@Service
public class FoodServiceImpl implements FoodService {

	// 织如入-依赖注入
	@Autowired
	private FoodDao foodDao;

	public void setFoodDao(FoodDao foodDao) {
		this.foodDao = foodDao;
	}

	@Override
	public int countFood() {
		// TODO 自动生成的方法存根
		return foodDao.countFood();
	}

	@Override
	public List<Food> findAll(Map<String, Object> map) {
		// TODO 自动生成的方法存根
		return foodDao.findAll(map);
	}

	@Override
	public int addFood(Food f) {
		// TODO 自动生成的方法存根
		return foodDao.addFood(f);
	}

	@Override
	public int updateFood(Food f) {
		// TODO 自动生成的方法存根
		return foodDao.updateFood(f);
	}

	@Override
	public List<Food> findList() {
		// TODO 自动生成的方法存根
		return foodDao.findList();
	}
	
	@Override
	public int deleteFood(int id) {
		// TODO 自动生成的方法存根
		return foodDao.deleteFood(id);
	}
	
	@Override
	public List<Food> findTop() {
		// TODO Auto-generated method stub
		return foodDao.findTop();
	}

	@Override
	public List<Food> findAllMenu() {
		// TODO Auto-generated method stub
		return foodDao.findAllMenu();
	}

	@Override
	public List<Food> findNewest() {
		// TODO Auto-generated method stub
		return foodDao.findNewest();
	}

	@Override
	public Food findFoodById(Food f) {
		// TODO Auto-generated method stub
		return foodDao.findFoodById(f);
	}


	@Override
	public List<Food> findFoodByMakeNo(Food food) {
		// TODO Auto-generated method stub
		return foodDao.findFoodByMakeNo(food);
	}

	@Override
	public List<Food> findFoodByTypeNo(Food food) {
		// TODO Auto-generated method stub
		return foodDao.findFoodByTypeNo(food);
	}

	@Override
	public Food findFoodByName(Food f) {
		// TODO Auto-generated method stub
		return foodDao.findFoodByName(f);
	}

	@Override
	public List<Food> findFoodArticle(Food food) {
		// TODO Auto-generated method stub
		return foodDao.findFoodArticle(food);
	}

}
